<template>
  <div>
    <h2>组件2</h2>
     {{ this.$store.state.age }}
     {{ this.$store.state.name }}
    <button @click="change">chagneAgeAndName</button>
  </div>
</template>
<script>
export default {
  methods: {
    change() {
      // this.$store.commit("changeAgeMutation",18)
      // this.$store.commit("changeNameMutation","heheda")
      this.$store.dispatch("combineAgeAndName",{name:"heheda", age:999})
    }
  }
}
</script>